 package handling.world;


import client.*;
import client.anticheat.CheatTracker;
import client.anticheat.ReportType;
import client.inventory.*;
import client.skills.InnerSkillEntry;
import client.skills.SkillEntry;
import client.skills.SkillMacro;
import server.MapleStorage;
import server.cashshop.CashShop;
import server.shop.MapleShopItem;
import tools.Pair;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.sql.Timestamp;
import java.util.*;



























 public class CharacterTransfer implements Externalizable {
/*  30 */   public final Map<MapleTraitType, Integer> traits = new EnumMap<>(MapleTraitType.class);
   public final List<Battler> boxed;
/*  32 */   public final List<CharacterNameAndId> buddies = new LinkedList<>();
/*  33 */   public final Map<Integer, MapleQuestStatus> Quest = new LinkedHashMap<>();
/*  34 */   public final Map<Integer, SkillEntry> skills = new LinkedHashMap<>();
   public final Map<String, Integer> credit;
   public final Map<Integer, Integer> mbook;
/*  37 */   public final Map<Byte, Integer> reports = new LinkedHashMap<>();
   public final Map<Integer, Pair<Byte, Integer>> keymap;
   public final List<Pair<Integer, Integer>> quickslot;
   public final Map<Integer, String> InfoQuest;
   public final Map<String, String> KeyValue;
/*  42 */   public final Map<Integer, VCoreSkillEntry> vcoreskills = new LinkedHashMap<>();
   public Map<Integer, VMatrixSlotEntry> vMatrixslots;
/*  44 */   public Map<Integer, Pair<Integer, SkillEntry>> sonOfLinedSkills = new LinkedHashMap<>(); public int characterid; public int accountid; public int fame; public int pvpExp; public int pvpPoints; public int hair; public int face; public int mapid; public int guildid; public int partyid; public int messengerid; public int mount_itemid; public int mount_exp; public int points; public int vpoints; public int marriageId; public int maxhp; public int maxmp; public int hp; public int mp; public int friendshiptoadd; public int familyid; public int seniorid; public int junior1;
   public int junior2;
   public int currentrep;
   public int totalrep;
   public int gachexp;
   public int guildContribution;
   public int totalWins;
   public int totalLosses;
   public int todayonlinetime;
   public int totalonlinetime;
   public int weaponPoint;
   public byte channel;
   public byte accountGender;
/*  57 */   public SkillMacro[] skillmacro = new SkillMacro[5]; public byte gender; public byte gmLevel; public byte guildrank; public byte alliancerank; public byte hairBaseColor; public byte hairProbColor; public byte hairMixedColor; public byte fairyExp; public byte buddysize; public byte world; public byte initialSpawnPoint; public byte skinColor; public byte mount_level; public byte mount_Fatigue; public byte subcategory; public long lastfametime; public long TranferTime; public long exp; public long meso; public String name; public String accountname; public String BlessOfFairy; public String BlessOfEmpress; public String chalkboard; public String tempIP; public short str; public short dex; public short int_; public short luk; public short remainingAp; public short hpApUsed; public short job; public short fatigue; public short soulcount; public int level; public MapleInventory[] inventorys;
   public MapleStorage storage;
   public CashShop cs;
/*  60 */   public Battler[] battlers = new Battler[6]; public CheatTracker anticheat; public MapleLieDetector antiMacro; public InnerSkillEntry[] innerSkills; public int[] savedlocation; public int[] wishlist; public int[] rocks;
   public int[] remainingSp;
   public int[] regrocks;
   public int[] hyperrocks;
   public int[] friendshippoints;
   public short[] petStore;
   public MapleImp[] imps;
/*  67 */   public List<Integer> finishedAchievements = null; public List<Integer> famedcharacters = null; public List<Integer> battledaccs = null;
/*  68 */   public List<MapleShopItem> rebuy = null; public int decorate; public int beans; public int warning; public int vip;
   public Timestamp viptime;
   public int reborns;
   public int reborns1;
   public int reborns2;
   public int reborns3;
   public int apstorage;
   public int honor;
   public int love;
   public long lastLoveTime;
/*  78 */   public Map<Integer, Long> loveCharacters = null;
   public int playerPoints;
   public int playerEnergy;
   public MaplePvpStats pvpStats;
   public int pvpDeaths;
   public int pvpKills;
   public int pvpVictory;
   public int darkLight;
   public MaplePotionPot potionPot;
   public MapleCoreAura coreAura;
   public PlayerSpecialStats SpecialStats;
   public MapleSigninStatus signinStatus;
   public List<Integer> effectSwitch;
   public Map<Integer, MonsterFamiliar> familiars;
/*  92 */   public Map<Byte, List<Integer>> extendedSlots = null; public long ltime; public boolean changed_wishlist; public boolean changed_trocklocations; public boolean changed_skillmacros; public boolean changed_achievements; public boolean changed_savedlocations; public boolean changed_pokemon; public boolean changed_questinfo; public boolean changed_skills; public boolean changed_reports; public boolean changed_extendedSlots; public boolean changed_innerSkills; public boolean changed_keyValue; public boolean changed_credit;
   public boolean changed_vcores;
   public boolean changed_union;
   public boolean changed_familiars;
   public MapleUnion mapleUnion;
   public MonsterFamiliarObj summonedFamiliar;
   public int atFamiliarID;

   public CharacterTransfer() {
/* 101 */     this.boxed = new ArrayList<>();
/* 102 */     this.finishedAchievements = new ArrayList<>();
/* 103 */     this.famedcharacters = new ArrayList<>();
/* 104 */     this.battledaccs = new ArrayList<>();
/* 105 */     this.extendedSlots = new HashMap<>();
/* 106 */     this.loveCharacters = new LinkedHashMap<>();
/* 107 */     this.rebuy = new ArrayList<>();
/* 108 */     this.KeyValue = new LinkedHashMap<>();
/* 109 */     this.InfoQuest = new LinkedHashMap<>();
/* 110 */     this.keymap = new LinkedHashMap<>();
/* 111 */     this.quickslot = new ArrayList<>();
/* 112 */     this.mbook = new LinkedHashMap<>();
/* 113 */     this.credit = new LinkedHashMap<>();
   }

   public CharacterTransfer(MapleCharacter chr) {
/* 117 */     this(chr, chr.getClient().getChannel());
   }

   public CharacterTransfer(MapleCharacter chr, int channel) {
/* 121 */     this.characterid = chr.getId();
/* 122 */     this.accountid = chr.getAccountID();
/* 123 */     this.accountname = chr.getClient().getAccountName();
/* 124 */     this.channel = (byte)chr.getClient().getChannel();


/* 127 */     this.vpoints = chr.getVPoints();
/* 128 */     this.name = chr.getName();
/* 129 */     this.fame = chr.getFame();
/* 130 */     this.love = chr.getLove();
/* 131 */     this.accountGender = chr.getAccountGender();
/* 132 */     this.gender = chr.getGender();
/* 133 */     this.level = chr.getLevel();
/* 134 */     this.str = chr.getStat().getStr();
/* 135 */     this.dex = chr.getStat().getDex();
/* 136 */     this.int_ = chr.getStat().getInt();
/* 137 */     this.luk = chr.getStat().getLuk();
/* 138 */     this.hp = chr.getStat().getHp();
/* 139 */     this.mp = chr.getStat().getMp();
/* 140 */     this.maxhp = chr.getStat().getMaxHp();
/* 141 */     this.maxmp = chr.getStat().getMaxMp();
/* 142 */     this.exp = chr.getExp();
/* 143 */     this.hpApUsed = chr.getHpApUsed();
/* 144 */     this.remainingAp = chr.getRemainingAp();
/* 145 */     this.remainingSp = chr.getRemainingSps();
/* 146 */     this.meso = chr.getMeso();
/* 147 */     this.pvpExp = chr.getTotalBattleExp();
/* 148 */     this.pvpPoints = chr.getBattlePoints();
/* 149 */     this.skinColor = chr.getSkinColor();
/* 150 */     this.job = chr.getJob();
/* 151 */     this.hair = chr.getHair();
/* 152 */     this.hairBaseColor = chr.getHairBaseColor();
/* 153 */     this.hairMixedColor = chr.getHairMixedColor();
/* 154 */     this.hairProbColor = chr.getHairProbColor();
/* 155 */     this.face = chr.getFace();
/* 156 */     this.mapid = chr.getMapId();
/* 157 */     this.initialSpawnPoint = chr.getInitialSpawnpoint();
/* 158 */     this.marriageId = chr.getMarriageId();
/* 159 */     this.world = chr.getWorld();
/* 160 */     this.guildid = chr.getGuildId();
/* 161 */     this.guildrank = chr.getGuildRank();
/* 162 */     this.guildContribution = chr.getGuildContribution();
/* 163 */     this.alliancerank = chr.getAllianceRank();
/* 164 */     this.gmLevel = (byte)chr.getGMLevel();
/* 165 */     this.points = chr.getPoints();
/* 166 */     this.fairyExp = chr.getFairyExp();
/* 167 */     this.petStore = chr.getPetStores();
/* 168 */     this.subcategory = chr.getSubcategory();
/* 169 */     this.imps = chr.getImps();
/* 170 */     this.fatigue = chr.getFatigue();
/* 171 */     this.currentrep = chr.getCurrentRep();
/* 172 */     this.totalrep = chr.getTotalRep();
/* 173 */     this.familyid = chr.getFamilyId();
/* 174 */     this.totalWins = chr.getTotalWins();
/* 175 */     this.totalLosses = chr.getTotalLosses();
/* 176 */     this.seniorid = chr.getSeniorId();
/* 177 */     this.junior1 = chr.getJunior1();
/* 178 */     this.junior2 = chr.getJunior2();
/* 179 */     this.gachexp = chr.getGachExp();
/* 180 */     this.boxed = chr.getBoxed();
/* 181 */     this.anticheat = chr.getCheatTracker();
/* 182 */     this.antiMacro = chr.getAntiMacro();
/* 183 */     this.tempIP = chr.getClient().getTempIP();
/* 184 */     this.rebuy = chr.getRebuy();
/* 185 */     this.decorate = chr.getDecorate();
/* 186 */     this.beans = chr.getBeans();
/* 187 */     this.warning = chr.getWarning();
/* 188 */     this.reborns = chr.getReborns();
/* 189 */     this.reborns1 = chr.getReborns1();
/* 190 */     this.reborns2 = chr.getReborns2();
/* 191 */     this.reborns3 = chr.getReborns3();
/* 192 */     this.apstorage = chr.getAPS();
/* 193 */     this.honor = chr.getHonor();
/* 194 */     this.vip = chr.getVip();
/* 195 */     this.viptime = chr.getViptime();
/* 196 */     this.playerPoints = chr.getPlayerPoints();
/* 197 */     this.playerEnergy = chr.getPlayerEnergy();
/* 198 */     this.pvpDeaths = chr.getPvpDeaths();
/* 199 */     this.pvpKills = chr.getPvpKills();
/* 200 */     this.pvpVictory = chr.getPvpVictory();
/* 201 */     this.darkLight = chr.getDarkLight();
/* 202 */     this.friendshiptoadd = chr.getFriendShipToAdd();
/* 203 */     this.friendshippoints = chr.getFriendShipPoints();
/* 204 */     this.soulcount = chr.getSoulCount();
/* 205 */     this.mapleUnion = chr.getMapleUnion();
/* 206 */     this.summonedFamiliar = chr.getSummonedFamiliar();
/* 207 */     this.atFamiliarID = chr.getCurrAIFamiliarID();
/* 208 */     this.changed_vcores = chr.isChanged_vcores();
/* 209 */     this.changed_familiars = chr.isChanged_familiars();

/* 211 */     for (int i = 0; i < this.petStore.length; i++) {
/* 212 */       MaplePet pet = chr.getSpawnPet(i);
/* 213 */       if (this.petStore[i] == 0) {
/* 214 */         this.petStore[i] = -1;
       }
/* 216 */       if (pet != null)
       {
/* 218 */         this.petStore[i] = (short)Math.max(this.petStore[i], pet.getInventoryPosition());
       }
     }



/* 224 */     for (MapleTraitType t : MapleTraitType.values()) {
/* 225 */       this.traits.put(t, Integer.valueOf(chr.getTrait(t).getTotalExp()));
     }
/* 227 */     for (BuddylistEntry qs : chr.getBuddylist().getBuddies()) {
/* 228 */       this.buddies.add(new CharacterNameAndId(qs.getCharacterId(), qs.getName(), qs.getGroup(), qs.isVisible()));
     }
/* 230 */     for (Map.Entry<ReportType, Integer> ss : (Iterable<Map.Entry<ReportType, Integer>>)chr.getReports().entrySet()) {
/* 231 */       this.reports.put(Byte.valueOf(((ReportType)ss.getKey()).i), ss.getValue());
     }
/* 233 */     this.buddysize = chr.getBuddyCapacity();

/* 235 */     this.partyid = (chr.getParty() == null) ? -1 : chr.getParty().getPartyId();

/* 237 */     if (chr.getMessenger() != null) {
/* 238 */       this.messengerid = chr.getMessenger().getId();
     } else {
/* 240 */       this.messengerid = 0;
     }
/* 242 */     this.finishedAchievements = chr.getFinishedAchievements();
/* 243 */     this.KeyValue = chr.getKeyValue_Map();
/* 244 */     this.InfoQuest = chr.getInfoQuest_Map();
/* 245 */     for (Map.Entry<Integer, MapleQuestStatus> qs : (Iterable<Map.Entry<Integer, MapleQuestStatus>>)chr.getQuest_Map().entrySet()) {
/* 246 */       this.Quest.put(qs.getKey(), qs.getValue());
     }
/* 248 */     this.mbook = chr.getMonsterBook().getCards();
/* 249 */     this.inventorys = chr.getInventorys();
/* 250 */     chr.getSkills().forEach(this.skills::put);
/* 251 */     chr.getSonOfLinkedSkills().forEach(this.sonOfLinedSkills::put);
/* 252 */     for (Map.Entry<Integer, VCoreSkillEntry> entry : (Iterable<Map.Entry<Integer, VCoreSkillEntry>>)chr.getVCoreSkill().entrySet()) {
/* 253 */       this.vcoreskills.put(entry.getKey(), entry.getValue());
     }
/* 255 */     this.vMatrixslots = chr.getVMatrixSlot();
/* 256 */     this.SpecialStats = chr.getSpecialStat();
/* 257 */     this.BlessOfFairy = chr.getBlessOfFairyOrigin();
/* 258 */     this.BlessOfEmpress = chr.getBlessOfEmpressOrigin();
/* 259 */     this.chalkboard = chr.getChalkboard();
/* 260 */     this.skillmacro = chr.getMacros();
/* 261 */     this.innerSkills = chr.getInnerSkills();
/* 262 */     this.keymap = chr.getKeyLayout().Layout();
/* 263 */     this.quickslot = chr.getQuickSlot().Layout();
/* 264 */     this.savedlocation = chr.getSavedLocations();
/* 265 */     this.wishlist = chr.getWishlist();
/* 266 */     this.rocks = chr.getRocks();
/* 267 */     this.regrocks = chr.getRegRocks();
/* 268 */     this.hyperrocks = chr.getHyperRocks();
/* 269 */     this.famedcharacters = chr.getFamedCharacters();
/* 270 */     this.battledaccs = chr.getBattledCharacters();
/* 271 */     this.lastfametime = chr.getLastFameTime();
/* 272 */     this.storage = chr.getStorage();
/* 273 */     this.pvpStats = chr.getPvpStats();
/* 274 */     this.potionPot = chr.getPotionPot();
/* 275 */     this.coreAura = chr.getCoreAura();
/* 276 */     this.cs = chr.getCashInventory();
/* 277 */     this.extendedSlots = chr.getAllExtendedSlots();
/* 278 */     MapleMount mount = chr.getMount();
/* 279 */     this.mount_itemid = mount.getItemId();
/* 280 */     this.mount_Fatigue = mount.getFatigue();
/* 281 */     this.mount_level = mount.getLevel();
/* 282 */     this.mount_exp = mount.getExp();
/* 283 */     this.battlers = chr.getBattlers();
/* 284 */     this.lastLoveTime = chr.getLastLoveTime();
/* 285 */     this.loveCharacters = chr.getLoveCharacters();
/* 286 */     this.TranferTime = System.currentTimeMillis();
/* 287 */     this.todayonlinetime = chr.getTodayOnlineTime();
/* 288 */     this.totalonlinetime = chr.getTotalOnlineTime();
/* 289 */     this.weaponPoint = chr.getWeaponPoint();
/* 290 */     this.credit = chr.getCredits();
/* 291 */     this.signinStatus = chr.getSigninStatus();
/* 292 */     this.effectSwitch = chr.getEffectSwitch();
/* 293 */     this.familiars = chr.getFamiliars();
/* 294 */     this.ltime = chr.getLTime();
   }


   @Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
/* 299 */     this.TranferTime = System.currentTimeMillis();
   }

   @Override
public void writeExternal(ObjectOutput out) throws IOException {}
 }


/* Location:              C:\PGX\Server.jar!\handling\world\CharacterTransfer.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */